﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using XML;

namespace XML_Creater
{
    class Program
    {
        static void Main(string[] args)
        {
            XML.XML tehXML = new XML.XML();
            string l = "";
            string h = "";
            string[] r;

            Console.WriteLine("============================================");
            Console.WriteLine(" PureUSB(TM) XML Creator             v1.0.0 ");
            Console.WriteLine("   Vaccination X                            ");
            Console.WriteLine("============================================");
            Console.WriteLine("");

            Console.Write ("Enter Document Name: ");
            l = Console.ReadLine();
            Console.Write("Enter Root Node Name: ");
            h = Console.ReadLine();

            tehXML.Load_XML(l, h);

            while (l != "exit")
            {
                l = Console.ReadLine();
                if (l.Length > 10)
                {
                    if (l.Substring(0, 10).ToLower() == "setsetting")
                    {
                        l = l.Substring(10, l.Length - 10);
                        r = l.Split(',');
                        tehXML.SetSetting(r[0], r[1]);
                    }
                }
            }
        }
    }
}
